package com.example.entity.dto;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

@Data
@Api(tags = "审批配置新增dto")
public class WorkflowConfigAddDto {

    @ApiModelProperty("审批编号")
    private String workflowConfigNo;

    @ApiModelProperty("审批单头名称")
    private String workflowConfigName;

    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("上报时触发的方法")
    private String reportMethod;

    @ApiModelProperty("取消上报时触发的方法")
    private String unReportMethod;

    @ApiModelProperty("对应的人员分级信息")
    List<WorkflowLevelConfigDto> levels;

    @Data
    public static class WorkflowLevelConfigDto{

//        @ApiModelProperty("审批阶段")
//        private String level;

        @ApiModelProperty("阶段结束后，要调用的后端方法")
        private String endTrigger;

        @ApiModelProperty("备注")
        private String remark;

        @ApiModelProperty("所有审批人信息")
        private List<WorkflowConfigAddDto.WorkflowPersonConfigDto> persons;
    }

    @Data
    public static class WorkflowPersonConfigDto{

        @ApiModelProperty("审批人编号")
        private String approverNo;

        @ApiModelProperty("审批人名称")
        private String approverName;
    }
}
